package com.iplant.wms.service;

import com.iplant.base.po.Pagination;
import com.iplant.base.po.ServiceResult;
import com.iplant.basic.service.po.bms.BMSEmployee;
import com.iplant.wms.service.po.asn.WMSReceiveBill;
import com.iplant.wms.service.po.bill.WMSOutboundOrder;
import com.iplant.wms.service.po.bill.WMSOutboundOrderItem;
import com.iplant.wms.service.po.bill.WMSSalesDelivery;
import com.iplant.wms.service.po.mrp.MRPDelivery;
import com.iplant.wms.service.po.wms.*;

import java.util.Calendar;
import java.util.List;

public interface WMSService {




    ServiceResult<Integer> WMS_UpdateResource(BMSEmployee wLoginUser, WMSResource wResource);

    ServiceResult<Integer> WMS_DeleteResource(BMSEmployee wLoginUser, WMSResource wResource);

    ServiceResult<WMSResource> WMS_QueryResource(BMSEmployee wLoginUser, int wID);

    ServiceResult<List<WMSResource>> WMS_QueryResourceList(BMSEmployee wLoginUser, int wStoreID, int wStoreRegionID,
                                                           int wStoreAreaID, int wStoreShelfID, int wStoreStationID, List<Integer> wStationID,
                                                           List<Integer> wMaterialID, Pagination wPagination);

    ServiceResult<Integer> WMS_UpdateStockSafe(BMSEmployee wLoginUser, WMSStockSafe wStockSafe);

    ServiceResult<Integer> WMS_DeleteStockSafe(BMSEmployee wLoginUser, WMSStockSafe wStockSafe);

    ServiceResult<Integer> WMS_ActiveStockSafe(BMSEmployee wLoginUser, WMSStockSafe wStockSafe, int wActive);

    ServiceResult<WMSStockSafe> WMS_QueryStockSafe(BMSEmployee wLoginUser, int wID, String wCode);

    ServiceResult<List<WMSStockSafe>> WMS_QueryStockSafeList(
            BMSEmployee wLoginUser, int wFactoryID, int wStoreRegionID, int wStoreID, String wStoreCode,
            String wStoreName, int wStoreAreaID, String wStoreAreaCode, String wStoreAreaName, int wMaterialID,
            String wMaterialCode, String wMaterialName, String wName, int wActive, Pagination wPagination);

    ServiceResult<Integer> WMS_UpdateStockAlarm(BMSEmployee wLoginUser, WMSStockAlarm wStockAlarm);

    ServiceResult<Integer> WMS_DeleteStockAlarm(BMSEmployee wLoginUser, WMSStockAlarm wStockAlarm);

    ServiceResult<Integer> WMS_ActiveStockAlarm(BMSEmployee wLoginUser, WMSStockAlarm wStockAlarm, int wActive);

    ServiceResult<WMSStockAlarm> WMS_QueryStockAlarm(BMSEmployee wLoginUser, int wID, String wCode);

    ServiceResult<List<WMSStockAlarm>> WMS_QueryStockAlarmList(
            BMSEmployee wLoginUser, int wFactoryID, int wStoreRegionID, int wStoreID, String wStoreCode,
            String wStoreName, int wStoreAreaID, String wStoreAreaCode, String wStoreAreaName, int wMaterialID,
            String wMaterialCode, String wMaterialName, String wName, int wActive, Calendar wStartTime,
            Calendar wEndTime, Pagination wPagination);

    ServiceResult<Integer> WMS_UpdateStockRecord(BMSEmployee wLoginUser, WMSStockRecord wStockRecord);

    ServiceResult<Integer> WMS_DeleteStockRecord(BMSEmployee wLoginUser, WMSStockRecord wStockRecord);

    ServiceResult<Integer> WMS_ActiveStockRecord(BMSEmployee wLoginUser, WMSStockRecord wStockRecord, int wActive);



    ServiceResult<Integer> WMS_DeleteStockFreeze(BMSEmployee wLoginUser, WMSStockFreeze wStockFreeze);

    ServiceResult<Integer> WMS_ActiveStockFreeze(BMSEmployee wLoginUser, WMSStockFreeze wStockFreeze, int wActive);


    ServiceResult<List<WMSStock>> WMS_QueryStockCountList(BMSEmployee wLoginUser, int wFactoryID, int wStoreID, int wStoreRegionID, int wStoreAreaID,
                                                     int wStoreShelfID, int wStoreStationID, List<Integer> wMaterialIDList, int wBatchRecordID, String wBatchRecordCode,String wProjectNo,
                                                     int wCustomerID, int wSupplierID, int wStockTypeID, int wStockStatus,int wHasItem, Pagination wPagination);



    ServiceResult<Integer> WMS_UpdateStockFreeze(BMSEmployee wLoginUser, WMSStockFreeze wStockFreeze);

    ServiceResult<List<WMSStockFreeze>> WMS_QueryStockFreezeList(
            BMSEmployee wLoginUser, int wFactoryID, int wStoreRegionID, int wStoreID, int wStoreAreaID,
            int wStoreShelfID, int wStoreStationID, int wMaterialID, String wMaterialCode, String wMaterialName,
            String wProjectNo, String wBatchNo, int wActive, Calendar wStartTime, Calendar wEndTime,
            Pagination wPagination);




    ServiceResult<List<MRPDelivery>> MRP_SelectDeliveryListByDate(BMSEmployee wLoginUser,
                                                   Calendar wStartDate, Calendar wEndDate, Pagination wPagination);

    ServiceResult<Integer> WMS_ApplyForShipment(BMSEmployee wLoginUser, int wWMSSalesDeliveryID);

    ServiceResult<WMSSalesDelivery> WMS_UpdateSalesDelivery(BMSEmployee wLoginUser,
                                                            WMSSalesDelivery wWMSSalesDelivery);

    ServiceResult<WMSSalesDelivery> WMS_SalesDeliveryStartSorting(BMSEmployee wLoginUser,
                                                                  WMSSalesDelivery wWMSSalesDelivery);

    ServiceResult<WMSSalesDelivery> WMS_SalesDeliveryFinishSorting(BMSEmployee wLoginUser,
                                                                   WMSSalesDelivery wWMSSalesDelivery);

    ServiceResult<WMSSalesDelivery> WMS_SalesDeliveryConfirmOutOfStock(BMSEmployee wLoginUser,
                                                                       WMSSalesDelivery wWMSSalesDelivery);

    ServiceResult<WMSSalesDelivery> WMS_SalesDeliverySubmitInvoice(BMSEmployee wLoginUser,
                                                                   int wWMSSalesDeliveryID);

    ServiceResult<List<WMSStockRecord>> WMS_QueryStockInfoByItemID(BMSEmployee wLoginUser,
                                                                   int wSalesDeliveryItemID);

    ServiceResult<Integer> WMS_DeliveryOutWarehouse(BMSEmployee wLoginUser, WMSOutboundOrder wWMSOutboundOrder);

    ServiceResult<Integer> WMS_DeleteOutboundOrder(BMSEmployee wLoginUser,
                                                            WMSOutboundOrder wWMSOutboundOrder);

    ServiceResult<List<WMSOutboundOrder>> WMS_SelectOutboundOrderListBySalesDeliveryID(BMSEmployee wLoginUser, int wSalesDeliveryID, Pagination wPagination);

    ServiceResult<WMSOutboundOrder> WMS_CreateFromReceiveBill(BMSEmployee wLoginUser, WMSReceiveBill wWMSReceiveBill);

    ServiceResult<WMSOutboundOrder> WMS_CreateFromSalesDelivery(BMSEmployee wLoginUser, WMSSalesDelivery wWMSSalesDelivery);

    ServiceResult<WMSOutboundOrder> WMS_GeneralSubmitStock(BMSEmployee wLoginUser,
                                                           WMSOutboundOrder wWMSOutboundOrder, int wType);

    ServiceResult<Integer> WMS_UpdateOutboundOrderItem(BMSEmployee wLoginUser,
                                                       WMSOutboundOrderItem wWMSOutboundOrderItem);

    ServiceResult<Integer> WMS_UpdateOutboundOrderItemList(BMSEmployee wLoginUser,
                                                           List<WMSOutboundOrderItem> wWMSOutboundOrderItemList);

    ServiceResult<Integer> WMS_DeleteOutboundOrderItem(BMSEmployee wLoginUser,
                                                       WMSOutboundOrderItem wOutboundOrderItem);

    ServiceResult<Integer> WMS_DeleteOutboundOrderItemList(BMSEmployee wLoginUser,
                                                           List<WMSOutboundOrderItem> wWMSOutboundOrderItemList);
}
